package com.gs.data.convert.enums;

import lombok.Getter;

/**
 * 业务功能枚举类
 * @author: guos
 * @date: 2025/10/15 11:13
 **/
@Getter
public enum BizEnum {

    JOIN_SINGLE_QUOT("join_single_quot", "单引号包装,逗号拼接"),
    JOIN_DOUBLE_QUOT("join_double_quot", "双引号包装,逗号拼接"),
    SINGLE_QUOT_TO_DOUBLE("single_quot_to_double", "单引号->双引号,逗号拼接"),
    DOUBLE_QUOT_TO_SINGLE("double_quot_to_single", "双引号->单引号,逗号拼接"),
    ;


    BizEnum(String key, String name) {
        this.key = key;
        this.name = name;
    }


    public static BizEnum getByKey(String key) {
        for (BizEnum bizEnum : BizEnum.values()) {
            if (bizEnum.getKey().equals(key)) {
                return bizEnum;
            }
        }
        throw new IllegalArgumentException("暂不支持此功能!");
    }

    /**
     * 下拉key
     */
    private final String key;

    /**
     * 下拉名称
     */
    private final String name;
}
